package com.imooc.ireader;

import com.imooc.ireader.utils.TTS;

public class VoiceTest {
    public static void main(String[] args) {
        TTS tts = new TTS();
        tts.appid="603de487";
        tts.apiSecret="7d809d932d8840de868431d76b786330";
        tts.apiKey="9b105171392aa31a90f99a3324f5a1f0";
        tts.voiceLocation="e:/temp/voice";

        // 1.生成认证信息
        String authURL= tts.getAuthUrl();
        // 2.生成语文件，下载到本地磁盘
        String xiaoyan = tts.startDoTTS(authURL, " Hello 慕课网 JAVA  WORLD", "xiaoyan", 50, 70);
        System.out.println(xiaoyan);
        // 3. 播放语音文件
        tts.play(xiaoyan);
    }
}
